package cn.gyn.gynrpc.demo.consumer;

import cn.gyn.gynrpc.core.annotation.GynConsumer;
import cn.gyn.gynrpc.demo.api.User;
import cn.gyn.gynrpc.demo.api.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 这里单独写个demo2是为了验证注解放在任何spring bean里的任意field上，都能调用provider
 */
@Component
@Slf4j
public class Demo2 {
    @GynConsumer
    UserService userService2;

    public void test() {
        User user = userService2.findById(100);
        log.info(user.toString());

    }
}
